-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor e2e tests setup #491
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Size Report
|
671ec06
to
9925a48
Compare
packages/app/src/features/farm-details/dialogs/claim/e2e/mainnet/ClaimSKY.test-e2e.ts
Outdated
Show resolved
Hide resolved
a287b2c
to
a875f16
Compare
a875f16
to
902574f
Compare
packages/app/src/test/e2e/setup.ts
Outdated
progressSimulationAndMine: ProgressSimulation | ||
} | ||
|
||
export type TestContext<T extends ConnectionType> = (T extends 'not-connected' ? {} : { account: Address }) & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO i would make account
optional here and simplify this type 🤷 . Generics are kinda PITA to pass around and this type is used in PageObjects etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kinda convenient that if you need an address you don't have to make an assertion. What about making T
equal not-connected
by default? As in here 53a3a24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kinda convenient that if you need an address you don't have to make an assertion.
But you need to make sure to pass appropriate generic type, no? Doesn't it result in some hard cast? or some other "unsafenest"? But I defer to your opinion here because you actually used this type xD
Closes FRO-1189